package com.ashapo.pattern.pattern026delegate;

//第6步
//使用BusinessDelegate和Client类来演示业务代理模式

public class BusinessDelegatePatternDemo {

    /**
     * 业务代理模式
     * @param args
     */
    public static void main(String[] args) {

        BusinessDelegate businessDelegate = new BusinessDelegate();
        businessDelegate.setServiceType("EJB");

        Client client = new Client(businessDelegate);
        client.doTask();

        businessDelegate.setServiceType("JMS");
        client.doTask();
    }
}
